package cn.bqjr.eily.samples.entity.po;

import cn.bqjr.eily.samples.entity.BasePO;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hillfly
 * @since 2017-05-30
 */
@TableName("sys_menu")
public class Menu extends BasePO {

    private static final long serialVersionUID = 1L;

    @TableId
    private Long menuId;
    /**
     * 菜单路由路径
     */
    private String href;
    /**
     * 打开方式
     */
    private String target;
    /**
     * 菜单名
     */
    private String cnName;
    /**
     * 上级菜单ID
     */
    private Long parentMenuId;
    /**
     * 菜单顺序
     */
    private Integer sortNo;
    /**
     * 菜单图标URL
     */
    private String icon;
    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    private String perms;
    /**
     * 类型   0：目录   1：菜单   2：按钮
     */
    private Integer type;


    public Long getMenuId() {
        return menuId;
    }

    public Menu setMenuId(Long menuId) {
        this.menuId = menuId;
        return this;
    }

    public String getHref() {
        return href;
    }

    public Menu setHref(String href) {
        this.href = href;
        return this;
    }

    public String getTarget() {
        return target;
    }

    public Menu setTarget(String target) {
        this.target = target;
        return this;
    }

    public String getCnName() {
        return cnName;
    }

    public Menu setCnName(String cnName) {
        this.cnName = cnName;
        return this;
    }

    public Long getParentMenuId() {
        return parentMenuId;
    }

    public Menu setParentMenuId(Long parentMenuId) {
        this.parentMenuId = parentMenuId;
        return this;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public Menu setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
        return this;
    }

    public String getIcon() {
        return icon;
    }

    public Menu setIcon(String icon) {
        this.icon = icon;
        return this;
    }

    public String getPerms() {
        return perms;
    }

    public Menu setPerms(String perms) {
        this.perms = perms;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public Menu setType(Integer type) {
        this.type = type;
        return this;
    }

    // 自定义参数 START
    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<Menu> child;

    public List<Menu> getChild() {
        return child;
    }

    public void setChild(List<Menu> child) {
        this.child = child;
    }
    // 自定义参数 END

    public static final String MENUID = "menuId";

    public static final String HREF = "href";

    public static final String TARGET = "target";

    public static final String CNNAME = "cnName";

    public static final String PARENTMENUID = "parentMenuId";

    public static final String SORTNO = "sortNo";

    public static final String ICON = "icon";

    public static final String PERMS = "perms";

    public static final String TYPE = "type";
}
